<link type="text/css" rel="stylesheet" href="<?php echo $this->assetDirWeb ?>css/Webmaster/user.css" />
<br/>
<label for="prependedInput">Assign staff:</label>
<div class="table-responsive"> 
    <table class="table table-bordered table-striped table-condensed">
        <thead>
            <tr>
                <th>Name</th>
                <th>Email</th>
                <th>Assign</th>
            </tr>
        </thead>   
        <tbody>

            <?php if ($data): ?>
                <?php foreach ($data as $item): ?>
                    <tr data="<?php $item->id ?>">
                        <td>
                            <a href="<?php echo $item->viewUrl ?>" data-rel="popover"                            
                               data-html="true" data-delay="1" data-trigger="hover"
                               data-content='<?php // echo $this->renderPartial('//user/_quick_detail', array('user' => $item, 'type' => $type), false, true);
                    ?>' >
                                   <?php echo $item->name ?>
                            </a>                        
                        </td>
                        <td><?php echo $item->email ?></td>

                        <td>
                            <input type="checkbox" <?php echo (ServiceStaff::checkStaffAssign($sid, $item->ukey)) ? 'checked' : ''; ?>  id="optionsCheckbox2" name="sukey[]" value="<?php echo $item->ukey ?>" >
                        </td>

                    </tr>                             
                <?php endforeach; ?>
            <?php else: ?>
            <div class="alert alert-block">
                <button type="button" class="close" data-dismiss="alert">×</button>
                Please create staff profile first
            </div>
        <?php endif; ?>
        </tbody>
    </table>
</div>
<script>
    $('a[data-rel="popover"]').popover();
</script>